<template>
	<view :data-theme="theme">
		<view class="card" style="padding: 10px 10px 10px 10px;">
			<view class="title" style="margin-bottom: 20px;font-size: 34rpx;font-weight: bold;">商户基本信息</view>
			<!-- <u-row customStyle="margin-bottom:20px">
				<u-col span="4">商户名称</u-col>
				<u-col span="8">{{baseData.name}}</u-col>
			</u-row> -->
			<view class="item_content">
				<view class="item_content_left">商户名称</view>
				<view class="item_content_right">
					{{baseData.name}}
				</view>
			</view>
			<!-- <u-row customStyle="margin-bottom:20px">
				<u-col span="4">商户登录账号</u-col>
				<u-col span="8">{{baseData.phone}}</u-col>
			</u-row> -->
			<view class="item_content">
				<view class="item_content_left">商户登录账号</view>
				<view class="item_content_right">
					{{baseData.phone}}
				</view>
			</view>
			<!-- <u-row customStyle="margin-bottom:20px">
				<u-col span="4">商户负责人姓名</u-col>
				<u-col span="8">{{baseData.realName}}</u-col>
			</u-row> -->
			<view class="item_content">
				<view class="item_content_left">商户负责人姓名</view>
				<view class="item_content_right">
					{{baseData.realName}}
				</view>
			</view>
			<!-- <u-row customStyle="margin-bottom:20px">
				<u-col span="4">商户分类</u-col>
				<u-col span="8">{{baseData.merCategory}}</u-col>
			</u-row> -->
			<view class="item_content">
				<view class="item_content_left">商户分类</view>
				<view class="item_content_right">
					{{baseData.merCategory}}
				</view>
			</view>
			<!-- <u-row customStyle="margin-bottom:20px">
				<u-col span="4">店铺类别</u-col>
				<u-col span="8">{{baseData.merType}}</u-col>
			</u-row> -->
			<view class="item_content">
				<view class="item_content_left">店铺类别</view>
				<view class="item_content_right">
					{{baseData.merType}}
				</view>
			</view>
			<!-- <u-row customStyle="margin-bottom:20px">
				<u-col span="4">添加商品</u-col>
				<u-col span="8">{{ baseData.productSwitch ? '需平台审核' : '平台免审核' }}</u-col>
			</u-row> -->
			<view class="item_content">
				<view class="item_content_left">添加商品</view>
				<view class="item_content_right">
					{{ baseData.productSwitch ? '需平台审核' : '平台免审核' }}
				</view>
			</view>
			<!-- <u-row customStyle="margin-bottom:20px">
				<u-col span="4">商户入驻时间</u-col>
				<u-col span="8">{{baseData.createTime}}</u-col>
			</u-row> -->
			<view class="item_content">
				<view class="item_content_left">商户入驻时间</view>
				<view class="item_content_right">
					{{baseData.createTime}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {getBaseInfoApi} from '@/api/merchant.js'
	import {
		setThemeColor
	} from '../../../utils/setTheme';
	let app = getApp();
	export default {
		data() {
			return {
				bgColor: "#ffffff",
				theme: app.globalData.theme,
				baseData:{},//基本信息数据
			};
		},
		onLoad() {
			this.bgColor = setThemeColor();
			uni.setNavigationBarColor({
				frontColor: '#ffffff',
				backgroundColor: this.bgColor,
			});
			this.getBaseInfo();
		},
		methods:{
			getBaseInfo(){
				getBaseInfoApi().then((res) => {
					this.baseData = res.data;
				})
			},
		},
	}
</script>

<style lang="scss">
	.bg_color {
		@include main_bg_color(theme);
	}
	
	.card {
		margin:  20rpx;
		background-color: #fff;
		border-radius: 20rpx;
	}
	
	.item_content {
		display: flex;
		justify-content: space-between;
		margin-bottom: 20rpx;
	
		.item_content_left {
			flex: 1;
		}
	
		.item_content_right {
			flex: 2;
		}
	}
</style>